<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>字符串操作的小方法</title>
</head>

<body>
  <!-- 
    toUpperCase() 方法用于把字符串转换为大写。
    toLowerCase() 方法用于把字符串转换为小写。
   -->
</body>
<script>
  "use strict";
  let txt = "Hello World!"

  document.write("<p>Big: " + txt.big() + "</p>")
  document.write("<p>Small: " + txt.small() + "</p>")

  document.write("<p>Bold: " + txt.bold() + "</p>")
  document.write("<p>Italic: " + txt.italics() + "</p>")

  document.write("<p>Blink: " + txt.blink() + " (does not work in IE)</p>")
  document.write("<p>Fixed: " + txt.fixed() + "</p>")
  document.write("<p>Strike: " + txt.strike() + "</p>")

  document.write("<p>Fontcolor: " + txt.fontcolor("Red") + "</p>")
  document.write("<p>Fontsize: " + txt.fontsize(16) + "</p>")

  document.write("<p>Lowercase: " + txt.toLowerCase() + "</p>")
  document.write("<p>Uppercase: " + txt.toUpperCase() + "</p>")

  document.write("<p>Subscript: " + txt.sub() + "</p>")
  document.write("<p>Superscript: " + txt.sup() + "</p>")

  document.write("<p>Link: " + txt.link("http://www.w3school.com.cn") + "</p>")
</script>

</html>